//
//  UIView+Alert.h
//  Express
//
//  Created by lhongl on 2025/9/26.
//  Copyright © 2025 QM. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, MGShowType) {
    ShowAlertType, // 弹框
    ShowAlertFromTopType, //顶部弹出
    ShowAlertFromBottomType, //底部弹出
    ShowTopType, // 顶部
    ShowBottomType, //底部
    ShowLeftType, // 左侧
    ShowRightType // 右侧
};

NS_ASSUME_NONNULL_BEGIN


@interface UIView (Alert)

/// 弹框
/// - Parameters:
///   - type: 位置
///   - superView: 父view
- (void)show:(MGShowType)type inView:(UIView * __nullable)superView;


/// 弹框【带背景点击消失事件】
/// - Parameters:
///   - type: 类型
///   - superView: 父view
- (void)showWithContextDismiss:(MGShowType)type inView:(UIView * __nullable)superView;


/// 消失
- (void)dismiss;


/// 消失
/// - Parameter completion: 消失完成回调
- (void)dismissWithCompletion:(void(^ __nullable)(void))completion;

@end

NS_ASSUME_NONNULL_END
